


import javax.swing.SwingUtilities;
import javax.swing.JFrame;
import java.util.Locale;

import org.apache.xmlrpc.XmlRpcException;
import org.apache.xmlrpc.client.XmlRpcClient;
import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
import javax.swing.JOptionPane;

public class ScalpelRemoteMain {
  
  private static final long serialVersionUID = -7388696472103457732L;
    
    public static void main(String[] args){
      /*XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
      try {
        config.setServerURL(new URL("http://192.168.0.14:49157/"));
      } catch (MalformedURLException e1) {
        // TODO Auto-generated catch block
        e1.printStackTrace();
      } // First Prime Number after in the "Dynamic, private or ephemeral" ports range: 49152�65535
      XmlRpcClient client = new XmlRpcClient();
      client.setConfig(config);
      
      Object[] params = new Object[]{new Double(1.0), new Double(1.0)};
      Integer result = null;
      Double res = null;
      try {
        client.execute( "world.modloco.setTarget", params);
      } catch (XmlRpcException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
      try {
        res = (Double) client.execute( "world.sharp0.getDistanceDetected", (Object[])null);
      } catch (XmlRpcException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
      
      if ( result != null )
          System.out.println( "Successfully pinged guest account." );
*/
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                createAndShowGUI(); 
            }
        });
    }

    private static void createAndShowGUI() {
        System.out.println("Created GUI on EDT? "+
            SwingUtilities.isEventDispatchThread());
        
        //create JFrame main
        JFrame f = new PreferenceFrame(Locale.US/*getDefault()*/);
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
        f.setVisible(true);

    } 
}